<template>
  <section id="contact" class="contact-simple">
    <div class="container">
      <h2>联系我们 - 简化版</h2>
      <p>如果您看不到这个文本，说明组件渲染有问题</p>
      
      <div class="contact-form">
        <form @submit.prevent="submitForm">
          <div class="form-group">
            <input type="text" v-model="form.name" placeholder="您的姓名" required>
          </div>
          <div class="form-group">
            <input type="email" v-model="form.email" placeholder="邮箱地址" required>
          </div>
          <div class="form-group">
            <textarea v-model="form.message" placeholder="留言内容" rows="5" required></textarea>
          </div>
          <button type="submit" class="btn">发送消息</button>
        </form>
      </div>
    </div>
  </section>
</template>

<script>
export default {
  name: 'ContactSimple',
  data() {
    return {
      form: {
        name: '',
        email: '',
        message: ''
      }
    }
  },
  mounted() {
    console.log('ContactSimple组件已挂载')
  },
  methods: {
    submitForm() {
      alert('表单提交: ' + JSON.stringify(this.form))
    }
  }
}
</script>

<style scoped>
.contact-simple {
  background: #f0f0f0;
  padding: 60px 20px;
  margin: 20px;
  border-radius: 10px;
  min-height: 300px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
}

h2 {
  color: #333;
  text-align: center;
  margin-bottom: 20px;
}

p {
  color: #666;
  text-align: center;
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 20px;
}

input, textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
}

.btn {
  background: #007bff;
  color: white;
  padding: 12px 30px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
}

.btn:hover {
  background: #0056b3;
}
</style>
